package common

import (
	"bytes"
	"testing"
)

func TestFprint(t *testing.T) {
	buf := &bytes.Buffer{}
	expected := "this is a test message"
	Fprint(buf, expected)
	if result := buf.String(); result != expected {
		t.Errorf("expected: %v, got: %v", expected, result)
	}
}

func TestFprintf(t *testing.T) {
	buf := &bytes.Buffer{}
	expected := "this is a test message"
	Fprintf(buf, expected)
	if result := buf.String(); result != expected {
		t.Errorf("expected: %v, got: %v", expected, result)
	}
}
